package com.atguigu.flink.chapter05;

import org.apache.flink.configuration.Configuration;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import javax.swing.filechooser.FileSystemView;

/**
 * @author liuyun
 * @title: Flink01_Env
 * @projectName flink0924
 * @description: TODO
 * @date 2022-3-3 17:20
 */
public class Flink01_Env {
    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        conf.setInteger("rest.port", 20000);
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(conf);
        env.setParallelism(1);

        env.socketTextStream("hadoop102", 9999).print();
        env.execute();

    }
}
